+2002-02-10 Anders Carlsson <andersca@gnu.org>
+
+ * gtk/gtkcalendar.c (gtk_calendar_class_init): Set finalize handler;
+ (gtk_calendar_finalize): Rename gtk_calendar_destroy to gtk_calendar_finalize
+ since ::destroy can be called multiple times, resulting in double-freeing memory.
+
2002-02-10 Hans Breuer <hans@breuer.org>
* gdk/win32/gdkgeometry-win32.c : don't reduce the scroll
+2002-02-10 Anders Carlsson <andersca@gnu.org>
+
+ * gtk/gtkcalendar.c (gtk_calendar_class_init): Set finalize handler;
+ (gtk_calendar_finalize): Rename gtk_calendar_destroy to gtk_calendar_finalize
+ since ::destroy can be called multiple times, resulting in double-freeing memory.
+
2002-02-10 Hans Breuer <hans@breuer.org>
* gdk/win32/gdkgeometry-win32.c : don't reduce the scroll
+2002-02-10 Anders Carlsson <andersca@gnu.org>
+
+ * gtk/gtkcalendar.c (gtk_calendar_class_init): Set finalize handler;
+ (gtk_calendar_finalize): Rename gtk_calendar_destroy to gtk_calendar_finalize
+ since ::destroy can be called multiple times, resulting in double-freeing memory.
+
2002-02-10 Hans Breuer <hans@breuer.org>
* gdk/win32/gdkgeometry-win32.c : don't reduce the scroll
+2002-02-10 Anders Carlsson <andersca@gnu.org>
+
+ * gtk/gtkcalendar.c (gtk_calendar_class_init): Set finalize handler;
+ (gtk_calendar_finalize): Rename gtk_calendar_destroy to gtk_calendar_finalize
+ since ::destroy can be called multiple times, resulting in double-freeing memory.
+
2002-02-10 Hans Breuer <hans@breuer.org>
* gdk/win32/gdkgeometry-win32.c : don't reduce the scroll
+2002-02-10 Anders Carlsson <andersca@gnu.org>
+
+ * gtk/gtkcalendar.c (gtk_calendar_class_init): Set finalize handler;
+ (gtk_calendar_finalize): Rename gtk_calendar_destroy to gtk_calendar_finalize
+ since ::destroy can be called multiple times, resulting in double-freeing memory.
+
2002-02-10 Hans Breuer <hans@breuer.org>
* gdk/win32/gdkgeometry-win32.c : don't reduce the scroll
+2002-02-10 Anders Carlsson <andersca@gnu.org>
+
+ * gtk/gtkcalendar.c (gtk_calendar_class_init): Set finalize handler;
+ (gtk_calendar_finalize): Rename gtk_calendar_destroy to gtk_calendar_finalize
+ since ::destroy can be called multiple times, resulting in double-freeing memory.
+
2002-02-10 Hans Breuer <hans@breuer.org>
* gdk/win32/gdkgeometry-win32.c : don't reduce the scroll
+2002-02-10 Anders Carlsson <andersca@gnu.org>
+
+ * gtk/gtkcalendar.c (gtk_calendar_class_init): Set finalize handler;
+ (gtk_calendar_finalize): Rename gtk_calendar_destroy to gtk_calendar_finalize
+ since ::destroy can be called multiple times, resulting in double-freeing memory.
+
2002-02-10 Hans Breuer <hans@breuer.org>
* gdk/win32/gdkgeometry-win32.c : don't reduce the scroll
static void gtk_calendar_class_init (GtkCalendarClass *class);
static void gtk_calendar_init (GtkCalendar *calendar);
-static void gtk_calendar_destroy (GtkObject *calendar);
+static void gtk_calendar_finalize (GObject *calendar);
static void gtk_calendar_realize (GtkWidget *widget);
static void gtk_calendar_unrealize (GtkWidget *widget);
static void gtk_calendar_size_request (GtkWidget *widget,
static void
gtk_calendar_class_init (GtkCalendarClass *class)
{
+ GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
-
+
+ gobject_class = (GObjectClass*) class;
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
parent_class = gtk_type_class (GTK_TYPE_WIDGET);
- object_class->destroy = gtk_calendar_destroy;
+ gobject_class->finalize = gtk_calendar_finalize;
widget_class->realize = gtk_calendar_realize;
widget_class->unrealize = gtk_calendar_unrealize;
}
static void
-gtk_calendar_destroy (GtkObject *object)
+gtk_calendar_finalize (GObject *object)
{
GtkCalendarPrivateData *private_data;
private_data = GTK_CALENDAR_PRIVATE_DATA (object);
+
g_free (private_data);
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ (* G_OBJECT_CLASS (parent_class)->finalize) (object);
}
static gboolean